<template>
  <el-input
    type="textarea"
    autosize
    v-bind="fld"
    :value='value'
    @input="handleModelInput"
    @change="handleChange"
    :ref="fld.name"
    ></el-input>
</template>
<script>
define(['vue'],function(vue){
  return vue.component('comp-text',{
    props:['fld','value'],
    template: template,
    methods:{
      handleModelInput :function(val){
        this.$emit("input", val);
      },
      handleChange :function(val){
        var key = `${this.fld.name}:change`;
        if(!this.$root.callbacks[key]) return;
        this.$root.callbacks[key].apply(this,arguments);
      },
    }
  });  
});
</script>
<style type="text/css"></style>